package com.design.pattern.structure.decorator.general;

public abstract class Decorator implements Component{
    /**
     * 持有组件对象
     */
    protected Component component;

    /**
     *
     * @param component
     */
    public Decorator(Component component) {
        this.component = component;
    }

    @Override
    public void operation() {
        //转发请求给组件对象，可以再转发前后执行一些附加组件
        component.operation();
    }
}
